Query the value of the element with the specified index and the size of a JSON array
Use the json_array_get function to obtain the value of the element with the specified index in a JSON array. Use the json_array_length function to obtain the size of a JSON array.
SQL
|
SELECT
json_array_get('["a", "b", "c"]', 1) as "value",
json_array_length('[1,12,4,5]') as "JSON array size"